WindowInsetsAnimationControllerCompat

Controller for app-driven animation of system windows.

WindowInsetsAnimationController lets apps animate system windows such as the IME. The animation is synchronized, such that changes the system windows and the app's current frame are rendered at the same time.

Control is obtained through controlWindowInsetsAnimation.

Functions

Link copied to clipboard
open fun finish(shown: Boolean)
Finishes the animation, and leaves the windows shown or hidden.
Link copied to clipboard
Current alpha value of the window.
Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
open fun getCurrentFraction(): Float
Returns the progress as previously set by fraction in setInsetsAndAlpha
Link copied to clipboard
Retrieves the current insets.
Link copied to clipboard
Retrieves the Insets when the windows this animation is controlling are fully hidden.
Link copied to clipboard
Retrieves the Insets when the windows this animation is controlling are fully shown.
Link copied to clipboard
open fun getTypes(): Int
Link copied to clipboard
open fun isCancelled(): Boolean
Returns whether this instance has been cancelled by the system, or by invoking the android.os.CancellationSignal passed into controlWindowInsetsAnimation.
Link copied to clipboard
open fun isFinished(): Boolean
Returns whether this instance has been finished by a call to finish.
Link copied to clipboard
open fun isReady(): Boolean
Returns whether this instance is ready to be used to control window insets.
Link copied to clipboard
open fun setInsetsAndAlpha(@Nullable insets: Insets, @FloatRange(from = 0.0, to = 1.0) alpha: Float, @FloatRange(from = 0.0, to = 1.0) fraction: Float)
Modifies the insets for the frame being drawn by indirectly moving the windows around in the system that are causing window insets.